﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ArticleSEOList.aspx.cs" Inherits="ArticleSEOList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <link type="text/css" href="css/jquery-ui.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery-ui.js"></script>
    <script type="text/javascript" src="js/lib.js"></script>
    <script type="text/javascript">
        $(function () {
            BindBtn();
            AddTrClass($("#listinfo"));
            $("#txtBeginDateTime").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd" });
            $("#txtEndDateTime").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd" });
        })
        function ShowDialog(type, id) {
            var url = "", title = "", width = 300, height = 100;
            switch (type) {
                case 1:
                    title = "编辑文章网址";
                    url = "EditArticleSEO.aspx?id=" + id;
                    width = 450;
                    height = 100;
                    break;
                case 2:
                    title = "新增文章网址";
                    url = "DoArticleSEO.aspx";
                    width = 620;
                    height = 320;
                    break;
            }
            top.CreateIframe(title, url, width, height);
        }
        function ShowSEO(id) {
            top.CreateIframe("收录详情", "ArticleSEOInfo.aspx?id=" + id, 800, 300);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="conBox">
        <table class="form-table">
            <thead>
                <tr>
                    <td colspan="3">
                        查询选项
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="oneTd">
                        <div>
                            <span runat="server" id="UserListPanel" style="color:#4b4646;">用户：<asp:DropDownList ID="ddlUser" runat="server">
                                <asp:ListItem Value="0" Text="所有用户"></asp:ListItem>
                            </asp:DropDownList></span>
                            分类：<asp:DropDownList ID="ddlSort" runat="server">
                                    <asp:ListItem Value="0" Text="请选择分类"></asp:ListItem>
                                  </asp:DropDownList>
                            文章类型：<asp:DropDownList ID="ddlUrlType" runat="server">
                                        <asp:ListItem Value="0" Text="所有"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="新闻源"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="外链"></asp:ListItem>
                                        <asp:ListItem Value="3" Text="站内"></asp:ListItem>
                                    </asp:DropDownList>
                             收录状态：<asp:DropDownList ID="ddlStatus" runat="server">
                                    <asp:ListItem Value="-1" Text="全部"></asp:ListItem>
                                    <asp:ListItem Value="1" Text="已收录"></asp:ListItem>
                                    <asp:ListItem Value="0" Text="未收录"></asp:ListItem>
                                  </asp:DropDownList>
                            日期：从<asp:TextBox ID="txtBeginDateTime" runat="server" CssClass="txtbox" Style="width: 100px"></asp:TextBox>到<asp:TextBox ID="txtEndDateTime" runat="server" CssClass="txtbox" Style="width: 100px"></asp:TextBox>
                           </div>
                    </td>
                </tr>
                <tr class="tr1">
                    <td class="oneTd">
                    <div>关键字：<asp:TextBox ID="txtKeywords" runat="server" CssClass="txtbox"></asp:TextBox> 文章网址：<asp:TextBox ID="txtUrl" runat="server" CssClass="txtbox" Style="width: 200px"></asp:TextBox>
                            <asp:Button ID="btnSubmit" runat="server" Text="查询" OnClick="btnSubmit_Click" CssClass="button" />
                            <asp:Button ID="btnReset" runat="server" Text="重置" OnClick="btnReset_Click" CssClass="button" style="display:none" /></div>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="ctrlbar">
            <div class="f-left">
            </div>
            <div class="f-right">
                <a href="javascript:ShowDialog(2,0)" class="toolbtn">
                    <img src="images/ico-add.gif" alt="新增" />新 增</a>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="grid-box">
            <table class="grid-table">
                <thead>
                    <tr>
                        <th class="align-l" style="width:10px;white-space:nowrap;">
                            序号
                        </th>
                        <td class="align-l">
                            标题
                        </td>
                        <td class="align-l">
                            网址
                        </td>
                        <td class="align-l" runat="server" id="ListUserTitle" style="width:10px;">
                            用户
                        </td>
                        <td class="align-l" style="width:10px;">
                            关键字
                        </td>
                        <td class="align-l" style="width:10px;">
                            分类
                        </td>
                        <td class="align-l" style="width:10px;">
                            类型
                        </td>
                        <td class="align-l" style="width:110px;">
                            创建日期
                        </td>
                        <td class="align-c" style="width:10px;">
                            收录
                        </td>
                        <td class="align-c" style="width:10px;">
                           提成(元)
                        </td>
                        <td class="align-c" style="width:10px;">
                            详情
                        </td>
                        <td class="align-c" style="width:10px;">
                            删除
                        </td>
                    </tr>
                </thead>
                <tbody id="listinfo">
                    <asp:Repeater ID="rptArticle" runat="server" OnItemCommand="rptArticle_ItemCommand"
                        OnItemDataBound="rptArticle_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                 <td style="white-space:nowrap;">
                                    <%#nNum++%>
                                </td>
                                <td>
                                    <a href="<%#Eval("ArticleUrl")%>" target="_blank" title=" <%#Eval("AritcleTitle")%>">
                                        <%#Eval("AritcleTitle")%></a>
                                </td>
                                <td style="width:280px;">
                                   <span style="word-wrap: break-word;width:280px; display:block"><a href="<%#Eval("ArticleUrl")%>" target="_blank">
                                        <%#Eval("ArticleUrl")%></a></span>
                                </td>
                                <td class="align-l"<%#CheckShow()%> style="white-space:nowrap;">
                                    <%#Server.HtmlEncode(Eval("Name").ToString())%>
                                </td>
                                 <td class="align-l" style="white-space:nowrap;">
                                    <%#Server.HtmlEncode(Eval("Keywords").ToString())%><br/>
                                    <%#Server.HtmlEncode(Eval("Keywords1").ToString())%>
                                 </td>
                                 <td class="align-l" style="white-space:nowrap;">
                                    <%#Server.HtmlEncode(Eval("SortName").ToString())%>
                                </td>
                                 <td class='align-l' style="white-space:nowrap;">
                                 <%#GetTypeName(Convert.ToInt32(Eval("UrlType")))%>
                                </td>
                                <td class='align-l'>
                                    <%#Eval("CreateTime")%>
                                </td>
                                <td class='align-c'>
                                    <img src="images/<%#Convert.ToBoolean(Eval("Status"))?"open.png":"close.png"%>" alt="" />
                                </td>
                                <td class='align-c'>
                                    <%#Convert.ToDouble(Eval("Momey")).ToString("0.##")%>
                                </td>
                                <td class='align-c'>
                                     <a href="javascript:ShowSEO(<%#Eval("ID")%>)"<%#CheckInfoShow(Eval("Status"),Eval("UrlType"))%>"><img alt="查看详情" src="images/ico_look.gif" /></a>
                                </td>
                                <td class='align-c'>
                                    <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("ID")%>'
                                        ImageUrl="images/ico-delete.gif" OnClientClick="return confirm('确定要删除吗?');" ToolTip="删除" Visible="false" />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
            <div id="noData" runat="server">
                <div class="noDateMsg">
                    没有任何信息！</div>
            </div>
            <div id="pageinfo" class="page">
                <webdiyer:AspNetPager ID="anpPage" runat="server" OnPageChanging="anpPage_PageChanging"
                    CurrentPageButtonClass="curPage" PageSize="50" AlwaysShow="true" ShowCustomInfoSection="left" CustomInfoTextAlign="Left" LayoutType="Table">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
